package com.example.paging3samples.network

import okhttp3.Interceptor
import okhttp3.Response

const val token = "BQD8rOoJp6MnLk5E5afEMOjrueSSQXX4vwul03u0pZ8t_El1IuOzy8bFKPb0YViCsnhClpB9Hu8pPV6cBPUVJhRIRGJniInczNRPMCZIkP69qwl4P6rskM7bHKhq32Pl1YmdYP7xmGIZP67KImAXpoE80R60zYstM0gDGvhlDqIYnCeN50w6zYEk_Wfqi4TEBCk"

class HeaderInterceptor : Interceptor {
    override fun intercept(chain: Interceptor.Chain): Response {
        val request = chain.request().newBuilder()
            .header("Accept", "application/json")
            .header("Content-Type", "application/json")
            .header("Authorization", "Bearer $token")
            .build()

        return chain.proceed(request)

    }
}